Hi, thanks, but I'm not sure how to use your code for my case, I needed the ancestors of the selected media node, to get this:
[quote]Documents \ All images \ Colored images \ Red images \ [/quote]
When the media-list displays all files in the "Red images" folder.
(as an example)
I guess that GetMedia only returns one node (and its children if specified), never the ancestors. Right?
However, I finally used the @path to display my breadcrumb correctly. @path contains all the ancestors up to root as comma delimited node id's ('-1,1300,1900,2105,2199').
Prgjonas its intresting to hear how you solved this problem but for anyone else reading this post in the future it could be useful to include the snipper of code on how you solved this as a point of reference please.
Warren, yes, absolutely, I'm not finished yet, thats why I haven't posted my code before, but here's my current version. It displays all folders back to the root folder (Documents).
[quote]Documents \ All images \ Colored images \ Red images \ [/quote]
Media breadcrumb [solved]
Hi!
Can someone tell me how to properly iterate over the ancestors of a media node to get a media breadrumb?
[code][/code]
This code only gives me the MediaRootId medianode. What have I missed?
try changing the 'false' value to 'true' in the GetMedia call
Here’s a bit of code I use. Hopefully it will help you get further.
[code]
[/code]
/Finn
Hi, thanks, but I'm not sure how to use your code for my case, I needed the ancestors of the selected media node, to get this:
[quote]Documents \ All images \ Colored images \ Red images \ [/quote]
When the media-list displays all files in the "Red images" folder.
(as an example)
I guess that GetMedia only returns one node (and its children if specified), never the ancestors. Right?
However, I finally used the @path to display my breadcrumb correctly. @path contains all the ancestors up to root as comma delimited node id's ('-1,1300,1900,2105,2199').
Prgjonas its intresting to hear how you solved this problem but for anyone else reading this post in the future it could be useful to include the snipper of code on how you solved this as a point of reference please.
Thanks,
Warren :)
Warren, yes, absolutely, I'm not finished yet, thats why I haven't posted my code before, but here's my current version. It displays all folders back to the root folder (Documents).
[quote]Documents \ All images \ Colored images \ Red images \ [/quote]
I used this code to split a string : http://www.abbeyworkshop.com/howto/xslt/xslt-split-values/index.html
[code]
[/code]
is working on a reply...